home *** CD-ROM | disk | FTP | other *** search
- #include "shape.h"
- #include "rectpie.h"
- #include <conio.h>
-
- main()
- {
- Segment s;
-
- int gdriver = (int) DETECT, gmode, errorcode;
- initgraph(&gdriver,&gmode,"\\borlandc\\bgi");
- errorcode = graphresult();
- if (errorcode != (int)grOk) {
- (void) cprintf("Graphics error: %s \n\r"
- "Program Terminating",
- grapherrormsg(errorcode));
- exit(1);
- }
-
- (void) SG_init(
- (&s,1,0,0,3,
- CR_ShapeThiS_0(CR_new_default()),
- RT_ShapeThiS_0(RT_new_default()),
- SG_ShapeThiS_0(SG_init(
- ((Segment *)0,1,20,20,2,
- PS_ShapeThiS_0(PS_new_default()),
- RT_ShapeThiS_0(RT_new_default())
- )
- ))
- )
- );
-
-
- SG_show_default(&s);
- SG_show(&s,getmaxx()/2,getmaxy()/2,2);
-
- SG_destruct(&s);
- (void) getch();
- closegraph();
- return 0;
- }
-